package ar.uade.edu.fain.ad.server.dao.entity;

import java.util.List;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;

@Entity
@DiscriminatorValue("CAJA")
@NamedQueries({
	@NamedQuery(name = "caja.byLocalId", query = 
			"	SELECT c" +
			"	FROM CajaEntity c" +
			"	WHERE c.local.id = :localId")
})
public class CajaEntity extends AreaEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@OneToMany(mappedBy = "caja")
	private List<CierreCajaEntity> cierres;

	@OneToMany(mappedBy = "caja")
	private List<FacturaEntity> facturas;

	public CajaEntity() {
		super();
	}

	public List<CierreCajaEntity> getCierres() {
		return cierres;
	}

	public void setCierres(List<CierreCajaEntity> cierres) {
		this.cierres = cierres;
	}

	public List<FacturaEntity> getFacturas() {
		return facturas;
	}

	public void setFacturas(List<FacturaEntity> facturas) {
		this.facturas = facturas;
	}

}
